<!DOCTYPE html>
<html lang="en">
<head>
  <meta charset="UTF-8">
  <meta name="viewport" content="width=device-width, initial-scale=1.0">
  <title>Document</title>
  <style>
    div:not(#app){
      padding: 50px;
    }
    #div1{
      background-color: rgb(17, 169, 189);
    }
    #div2{
      background-color: rgb(214, 91, 15);
    }
    #div3{
      background-color: rgb(133, 141, 57);
    }
  </style>
</head>
<body>
  <div id="app">
   <div id="div1" @click="fn1()">
     <div id="div2" @click="fn2()">
       <div id="div3" @click="fn3($event)"></div>
     </div>
   </div>
  </div>
  <script src="./vue.js"></script>
  <script>
    const vm = new Vue({
      el: '#app',
      methods: {
        fn1(){
          alert(1)
        },
        fn2(){
          alert(2)
        },
        fn3(e){
          console.log(e)
          e.stopPropagation();
          alert(3)
        }
      }
    })
    /*
    function fn(){} 
    btn.onclick = fn;

    btn.onclick = function(){
      fn()
    }
    */
  </script>
</body>
</html>